﻿using System;
using System.Collections.Generic;
using System.Text;

namespace ChangeProblem.Logic
{
    public class OddChange
    {
        public int[] Change(decimal change,decimal[] value)
        {
            int[] numbers = new int[value.Length];

                for (int i = 0; change != 0; i++)
                {
                    numbers[i] = (int)(change / value[i]);
                    change = change % value[i];
                }
            
            return numbers;
        }

        public decimal Rest(decimal moneyOfPay, decimal pricesForGoods)
        {
            decimal change = moneyOfPay - pricesForGoods;
            return change;
        }

    }
}